<?php
//use Illuminate\Http\Request;

//$router->get('/',function() use($router) {
//    return $router->app->version();
//});
$router->get('/','CollectiveController@index');

$router->get('message', 'LoginController@message');

$router->post('send', 'CollectiveController@send');
$router->post('area', 'CollectiveController@area');
$router->post('config', 'CollectiveController@sys_config');
$router->post('configSys', 'CollectiveController@config_sys');
$router->post('productXq', 'CollectiveController@productXq');
$router->post('clear', 'CollectiveController@clear');
$router->post('pic', 'CollectiveController@pic');
$router->post('authCode', 'CollectiveController@authCode');

$router->post('picBase64', 'CollectiveController@pic_base64');
//$router->post('miner', 'CollectiveController@miner');
$router->post('/huifu', 'ApiController@huifu');




//文章
$router->post('articleIndex', 'Admin\ArticleController@index');
$router->post('articleXq', 'Admin\ArticleController@xq');
$router->post('articlePush', 'Admin\ArticleController@push');

// 注册 登陆 忘记密码
$router->post('register', 'Index\AuthController@register');
$router->post('login', 'Index\AuthController@login');
$router->post('fog', 'Index\AuthController@fog');


$router->post('gateMarketList', 'GateIo\IndexController@marketList');
$router->post('gateTickers', 'GateIo\IndexController@tickers');
$router->post('gateKline'  , 'GateIo\IndexController@kline');
$router->get('addMinerBalanceProfit', 'Index\MinerBalanceController@add_profit');//脚本的数据

$router->group(['middleware' => 'auth'], function () use ($router) {


    $router->post('/video', 'Index\QiniuController@uptoken');

    //前台用户|
    $router->post('logout', 'Index\AuthController@logout');
    $router->post('userInfo', 'Index\AuthController@userInfo');
    $router->post('refresh', 'Index\AuthController@refreshToken');
    $router->post('userSend', 'Index\UserController@user_send');
    $router->post('password', 'Index\UserController@password');
    $router->post('userEdit', 'Index\UserController@edit');
    $router->post('userTransfer', 'Index\UserController@transfer');
    $router->post('userTransfer_list', 'Index\UserController@transfer_list');




    //用户钱包
    $router->post('userBalanceXq', 'Index\UserBalanceController@xq');
    $router->post('userBalanceTransfer', 'Index\UserBalanceController@transfer');
    $router->post('userBalanceProfit', 'Index\UserBalanceController@profit');


    //前台矿机钱包
    $router->post('minerBalanceXq', 'Index\MinerBalanceController@xq');
    $router->post('minerBalanceTransfer', 'Index\MinerBalanceController@transfer');
    $router->post('minerBalanceProfit', 'Index\MinerBalanceController@profit');


    //前台fil记录
    $router->post('/filProfit', 'Index\FilController@profit');
    $router->post('/filTransferList', 'Index\FilController@transfer_list');


    //前台提现
    $router->post('withdraw', 'Admin\WithdrawController@withdraw');
    $router->post('withdrawIndex', 'Admin\WithdrawController@index');
    $router->post('withdrawXq', 'Admin\WithdrawController@xq');




    $router->post('userBalance', 'Index\WalletController@balance');
    $router->post('walletXq', 'Index\WalletController@Xq');
    $router->post('userWithdraw', 'Index\WalletController@withdraw');
    $router->post('userTransfer_eth', 'Index\WalletController@transfer_eth');


    //前台矿机
    $router->post('minerIndex', 'Admin\MinerController@home');
    $router->post('minerXq', 'Admin\MinerController@xq');
    $router->post('minerBalance', 'Admin\MinerController@balance');
    $router->post('minerTest', 'Admin\MinerController@test');


    $router->post('minerWithdraw', 'Index\MinerController@withdraw');
    $router->post('minerTransfer', 'Index\MinerController@transfer');
    $router->post('minerTransfer_list', 'Index\MinerController@transfer_list');

    $router->post('minerTransfer_eth', 'Index\MinerController@transfer_eth');

    //前台钱包
    $router->post('walletBank', 'Index\WalletController@bank');
    $router->post('walletBind', 'Index\WalletController@bind');
    $router->post('walletList', 'Index\WalletController@wallet_list');




    $router->post('/regional', 'Index\InviteController@regional');
    $router->post('/direct', 'Index\InviteController@direct');


});
$router->post('admin/login', 'Admin\AuthController@login');
$router->post('admin/logout', 'Admin\AuthController@logout');

$router->group(['prefix' => '/admin', 'middleware' => 'admin_auth'], function () use ($router) {

    $router->post('logout', 'Admin\AuthController@logout');
    $router->post('refresh', 'Admin\AuthController@refreshToken');

    $router->post('adminInfo', 'Admin\AdminController@info');
    $router->post('adminIndex', 'Admin\AdminController@index');
    $router->post('adminXq', 'Admin\AdminController@xq');
    $router->post('adminDelete', 'Admin\AdminController@delete');
    $router->post('adminAdd', 'Admin\AdminController@add');
    $router->post('adminEdit', 'Admin\AdminController@Edit');
    $router->post('adminReset', 'Admin\AdminController@reset');
    $router->post('adminChange', 'Admin\AdminController@change');

    $router->post('roleIndex', 'Admin\RoleController@index');
    $router->post('roleXq', 'Admin\RoleController@xq');
    $router->post('roleAdd', 'Admin\RoleController@add');
    $router->post('roleEdit', 'Admin\RoleController@edit');
    $router->post('roleDelete', 'Admin\RoleController@delete');
    $router->post('roleMenu', 'Admin\RoleController@menu');



    //后台用户|
    $router->post('userIndex', 'Admin\UserController@index');
    $router->post('userXq', 'Admin\UserController@xq');
    $router->post('userReset', 'Admin\UserController@reset');

    $router->post('userDelete', 'Admin\UserController@delete');
    $router->post('userTeam', 'Admin\UserController@team');
    $router->post('userProfit', 'Admin\UserController@profit');
    $router->post('userTransfer', 'Admin\UserController@transfer');
    $router->post('userTransfer_list', 'Admin\UserController@transfer_list');

    $router->post('userLevel', 'Admin\UserController@level');
    $router->post('userState', 'Admin\UserController@state');
    $router->post('userPhone', 'Admin\UserController@phone');

	
	$router->post('userRegional', 'Admin\UserController@regional');
    $router->post('userChild', 'Admin\UserController@child');
    
    
    //后台提现
    $router->post('withdrawIndex', 'Admin\WithdrawController@index');
    $router->post('withdrawCheck', 'Admin\WithdrawController@check');


    $router->post('panelIndex', 'Admin\PanelController@index');
    $router->post('panelList', 'Admin\PanelController@list');
    $router->post('panelListXq', 'Admin\PanelController@list_xq');


    //后台矿机
    $router->post('minerAdd', 'Admin\MinerController@add');
    $router->post('minerIndex', 'Admin\MinerController@index');
    $router->post('minerXq', 'Admin\MinerController@xq');
    $router->post('minerBind', 'Admin\MinerController@bind');
     $router->post('minerEdit', 'Admin\MinerController@edit');
    $router->post('minerToken', 'Index\QiniuController@up_token');

    //后台用户钱包
    $router->post('/userBalanceProfit', 'Index\UserBalanceController@profit');
    $router->post('/userBalanceTransfer', 'Index\UserBalanceController@transfer_sys');

    //后台矿机钱包
    $router->post('/minerBalanceProfit', 'Index\MinerBalanceController@profit');


    //后台fil
    $router->post('filMeter', 'Index\FilController@meter');
    $router->post('filTransfer', 'Index\FilController@transfer_sys');
    $router->post('filTransferList', 'Index\FilController@transfer_list');


    $router->post('minerProfit', 'Admin\MinerController@profit');

    $router->post('minerTransfer_list', 'Admin\MinerController@transfer_list');

    //后台文章
    $router->post('articleIndex', 'Admin\ArticleController@index');
    $router->post('articleXq', 'Admin\ArticleController@xq');
    $router->post('articleDelete', 'Admin\ArticleController@delete');
    $router->post('articleAdd', 'Admin\ArticleController@add');
    $router->post('articleEdit', 'Admin\ArticleController@edit');
    $router->post('pic', 'Admin\ArticleController@pic');


    //后台配置
    $router->post('configLevel', 'Admin\ConfigController@level');
    $router->post('configProducts', 'Admin\ConfigController@products');
    $router->post('configSys', 'Admin\ConfigController@sys');


});









